package Classes.staticinfo
{
	import Classes.Managers.M_ConfigData;
	
	import flash.external.ExternalInterface;

	/** 
	 * @author thy
	 * @version 1.0.0 
	 * 创建时间：Jul 7, 2012 11:30:10 AM 
	 */ 
	public class PlatformInfo
	{
		private static var _instance:PlatformInfo;

		private var _loginMissionShareCount:int=0;
		private var _isMoveScreen:Boolean=false;
		
		private var _openid:String;
		private var _openkey:String;
		private var _pf:String;
		private var _pfkey:String;
		
		
		public function PlatformInfo(){}
		
		public static function get instance():PlatformInfo
		{
			if(!_instance)_instance=new PlatformInfo();
			return _instance;
		}
		
		public function qqPlatBuyItemFun(shopId:Number,shopPic:String,shopNum:int,shopdes:String,itemId:Number):void
		{
			var payinfo:Object=new Object();
			payinfo.openid=this.openid;
			payinfo.openkey=this.openkey; //pt sessionID
			payinfo.pf=this.pf; //pt name
			payinfo.pfkey=this.pfkey; //
			payinfo.itemid=shopId; //shop id
			payinfo.goodsurl=M_ConfigData.instance.shopPicUrl+shopPic+".png";//sp pic
			payinfo.itemnum=shopNum; //pl
			payinfo.goodsmeta=shopdes;//itemName*itemDEs
			payinfo.itemId=itemId;
			
			if (ExternalInterface.available)
			{
				ExternalInterface.call("gentoken", payinfo);
			}
			
		}
		
		/**
		 * 记录每天登陆之后任务分享次数 
		 */
		public function get loginMissionShareCount():int
		{
			return _loginMissionShareCount;
		}
		
		/**
		 * @private
		 */
		public function set loginMissionShareCount(value:int):void
		{
			_loginMissionShareCount = value;
		}

		/**
		 * 是否在进行移屏操作 
		 */
		public function get isMoveScreen():Boolean
		{
			return _isMoveScreen;
		}

		/**
		 * @private
		 */
		public function set isMoveScreen(value:Boolean):void
		{
			_isMoveScreen = value;
		}

		/**
		 * 平台ID 
		 */
		public function get openid():String
		{
			return _openid;
		}

		/**
		 * @private
		 */
		public function set openid(value:String):void
		{
			_openid = value;
		}

		/**
		 * 平台Sessionkey 
		 */
		public function get openkey():String
		{
			return _openkey;
		}

		/**
		 * @private
		 */
		public function set openkey(value:String):void
		{
			_openkey = value;
		}

		/**
		 * 平台名称 
		 */
		public function get pf():String
		{
			return _pf;
		}

		/**
		 * @private
		 */
		public function set pf(value:String):void
		{
			_pf = value;
		}

		/**
		 * 平台key 
		 */
		public function get pfkey():String
		{
			return _pfkey;
		}

		/**
		 * @private
		 */
		public function set pfkey(value:String):void
		{
			_pfkey = value;
		}

		
	}
}
